1. Field of Invention
The invention relates to an automatic gain control and its controlling method. In particular, the invention relates to a rapid automatic gain control and its controller method used in a wireless communication network.
2. Related Art
In a wireless communication network, the distances among devices and the obstacles in between are different. Therefore, the intensity change cannot be known in advance. The received signal has to be tuned to a default value so that the receiver reaches its optimized dynamic range. A common method is to use an automatic gain control (AGC). In a wireless local area network (WLAN) system, the AGC adjusts the intensity of the received signal to a predetermined level according to the preamble at the beginning of a packet. Because of the existence of noises and interference, the estimate of the required gain has a certain error. The error will result in errors in the adjusted signal. To prevent this from happening, only a step size is adjusted at a time, approaching the predetermined level by multiple adjustments.
FIG. 1 shows a schematic view of how the AGC in the prior art functions. When performing automatic gain controls, a simulated signal is amplified by a variable gain amplifier (VGA) 10. Converted by an analog-digital converter (ADC) 20 into a digital signal, the simulated signal is sent to the AGC 30. The AGC 30 generally contains an average power computing unit 310, a logic control unit 320, and a tracking unit 330. The tracking unit 330 includes a comparing device 3301, a step-size adjusting unit 3302, and a loop filter 3303. The average power computing unit 310 computes the average power of the currently received signal. Under the control of the logic control unit 320, the average power is compared with a target power by the comparing device 3301 (implemented by, e.g., an adder). It is adjusted by the step-size adjusting unit 1202 (implemented by, e.g., a multiplier). A certain proportion enters the loop filter 1203 to be converted by a digital-analog converter (DAC) into an analog signal. The analog signal controls the control voltage of the VGA to adjust the gain. The main objective of the control loop is to adjust the voltage of the signal so that it falls within the dynamic range when it enters the ADC.
Using the above-mentioned step-size tracking method can gradually approach the target gain, yet it takes a longer time. For some systems that require fast gain adjustments, this method is not satisfactory. Therefore, how to quickly adjust the gain is an important issue.
In reality, the estimate of the average power has a certain error because of the influence of noises and interference. Therefore, one has to take into account the characteristics of the gain adjusting loop. In general, the loop design has to consider the following two factors: (1) the converging speed of the gain adjustments; and (2) the error of gain adjustments. One important factor is the choice of the step size.
As shown in FIG. 2, if one selects a smaller step the gain can be tuned to a more accurate range. However, it takes a longer time. When one selects a bigger step, as shown in FIG. 3, the gain can be quickly tuned close to the target gain. Nonetheless, the accuracy is worse. From the analyses shown in FIGS. 2 and 3, the gain adjustment has two modes: acquisition and tracking. When the gain is far from the target gain, the adjustment had better to use the quick acquisition mode. When the gain is close to the target gain, the adjustment step has to be reduced in order not to be over-tuned. This is then the tracking mode. FIG. 4 shows an ideal gain adjustment example. An important factor to achieve such an ideal adjustment is: using the large-step adjustment when the gain is far from the target gain while using small-step adjustment when the gain is close to the target gain.
In a WLAN system, data transmissions are in the form of packets. The receiving end cannot know when to start receiving a packet. The receiver may be turned on at any point. Therefore, the receiver has to tune the gain according to the received signal intensity at that time. If the signal intensity varies after the system has finished tuning the gain, the gain tuner still has to be able to tune to an appropriate value in a relatively short time. FIG. 5 shows an example illustrating the gain variation when a receiver receives noises followed by a packet.
In reality, the receiver cannot know when a packet is entering the receiver. The most important factor for rapid convergence in gain tuning is that the gain tuner is able to enter the acquisition mode to quickly adjust its gain in large steps. Consequently, the gain tuner should be able to accurately determine when to enter the acquisition mode and when to switch to the tracking mode.
The U.S. Pat. No. 6,420,934 discloses an automatic gain control circuit. As shown in FIG. 6, the signal amplified by the AGC 601 goes through a receive signal strength indicator (RSSI) 604 to indicate the strength of the received signal. By using a comparing device 605 to compare the signal with various predetermined thresholds, the strength of the received signal is determined. A determination logic 606 uses the result to determine whether the AGC should enter the quick acquisition mode or the small-step tracking mode. However, this method cannot accurately compute the real strength when the signal saturates and experiences clipping. Due to the influence of noises and errors, the selection of the thresholds is not an easy task.